<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\IndexController;
use App\Http\Controllers\ArticleController;
use App\Http\Controllers\CategoryController;
use App\Http\Controllers\TagController;
use App\Http\Controllers\ArchiveController;
use App\Http\Controllers\AboutController;


/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


// 首页
Route::get('/', [IndexController::class, 'index']);
// 文章详情
Route::get('/article/{id}', [ArticleController::class, 'detail'])->where('id', '[0-9]+');
// 分类
Route::get('/category', [CategoryController::class, 'index']);
Route::get('/category/{id}', [CategoryController::class, 'detail'])->where('id', '[0-9]+');
// 标签
Route::get('/tag', [TagController::class, 'index']);
Route::get('/tag/{id}', [TagController::class, 'detail'])->where('id', '[0-9]+');
// 归档
Route::get('/archive', [ArchiveController::class, 'index']);
Route::get('/archive/{year}/{month}', [ArchiveController::class, 'detail']);
// 关于
Route::get('/about', [AboutController::class, 'index']);
